Semiconductor memory is widely used in various electronic devices such as mobile computing devices, mobile phones, solid-state drives, digital cameras, personal digital assistants, medical electronics, servers, and non-mobile computing devices. Semiconductor memory may include non-volatile memory or volatile memory. A non-volatile memory device allows information to be stored or retained even when the non-volatile memory device is not connected to a power source. In contrast, the content of volatile memory, such as volatile cache, are erased when the volatile memory device is disconnected from a power source. For simplicity, “volatile cache” will be referred to as “cache.”
Data storage devices may include a memory controller and one or more semiconductor memory devices. Date storage devices may be configured to write data to multiple memory cells concurrently, rather than writing data to one memory cell at a time. In such data storage devices, the smallest set of memory cells that can be written at a time may be referred to as a write block. Because individual write commands may be associated with less than a full write block of data, a data storage device may store data to be written to a non-volatile memory in a cache. After sufficient data are available in the cache to fill a write block, a full write block of data may be written from the cache to the non-volatile memory.
In certain circumstances, a device (e.g., a host) coupled to the data storage device may issue a flush command to clear the cache. In response to receiving the flush command, the data storage device writes the data in the cache to the non-volatile memory. However, flush commands are costly, and may decrease system throughput.